Moire correction in images

ABSTRACT

Image defects in a digital image are reduced by a process comprising:  
     providing a digital image data set in the form of a matrix of pixels;  
     selecting a sub-matrix comprising at least a 5×5 matrix of pixels;  
     identifying a pixel within the sub-matrix to be treated as a central pixel;  
     determining a value for at least one optical property in the central pixel;  
     selecting at least four pixels around the central pixel as averaging pixels, at least two of the averaging pixels being in a position in the sub-matrix that is not adjacent the position in the matrix of the central pixel;  
     determining a value for the at least one optical property for the at least four averaging pixels;  
     averaging the values for the at least one optical property for more than one of the at least four averaging pixels to provide an average treatment value for the central pixel;  
     assigning the average treatment value for the central pixel to the central pixel; and  
     storing the average treatment value assigned to the central pixel.

BACKGROUND OF THE INVENTION

[0001] 1. Field of the Invention

[0002] The present invention relates to image data, particularly imagedata that is provided as an image file, and particularly image data thatgenerates an image and may contain moiré patterns, particularly colorimages that display moiré patterns in virtual or real images.

[0003] 2. Background of the Art

[0004] Recorded images comprise a spatial, normally planar,representation of either spatially or temporally variable originalsignals. A large proportion of such recordings, such as copies ofdocuments and pictures, represent a one-to-one relationship with anoriginal document or scene, frequently with magnification or reductioninvolved. Radiographic film images in medicine represent a class ofimages where the original is not visible to the human eye and must beformed by a combination of invisible radiation (e.g., x-rays) and asuitable transducer (fluorescent screen).

[0005] In all image forming systems, degradation of the originalinformation occurs which normally manifests itself in at least threeforms: (1) blurring of edges (reduced resolution, lower sharpness); (2)random irregularities (noise, fog); and (3) image format artifacts(e.g., smudging, spreading, moiré patterns, blocking and trapping). Innormal photographic images, it has long been known that edge sharpnesscan be enhanced and noise reduced by masking the original with anegative unsharp mask of suitable contrast (usually with lower contrastthan that of the original). Early work by J. A. C. Yule isrepresentative of this photographic masking approach (U.S. Pat. Nos.2,407,211, 2,420,636, 2,455,849) and more complex approaches arerepresented by Blearson et al. in U.S. Pat. No. 3,615,433. An earlyattempt to use a raster scanning of the image while measuring theinstantaneous light values photoelectrically and attenuating the beamaccording to a predetermined relationship with the light value isdisclosed by Folse in U.S. Pat. No. 3,011,395. The rapid development ofthe Space Program lead to the emergence of high efficiency digital meansof analyzing, reconstituting and enhancing images. Median filtering as ameans of enhancing edge contrast has also been studied (e.g., B. R.Frieden JOSA 66. 280-283 (1976)). In the medical radiography field thisstimulated the development of computerized tomography and the digitalprocessing of radiographs in general (S. R. Amety et al, SPIE 207,210-211 (1979), and C. R. Wilson et al, SPIE 314, 327-330 (1981)). Inthese approaches the image has been divided into a large number of“pixels” by scanning. A moving window consisting of n×m pixels centeredon pixel i with image value D_(i) is investigated by an on line computeras pixels i are scanned. The arithmetic average D of the pixels withinthe window is then used to modify the central pixel value D_(i) to afiltered value D′_(i) by the algorithm:

D′ _(i) =aD _(i) −bD

[0006] The parameters a and b are chosen to give specific imagecharacteristics but are constant over the scan of a single image.

[0007] The concept of varying parameters similar to a and b throughoutthe scan of the image based on certain local properties of the image hasbeen studied and these patents (H. Kato et al U.S. Pat. Nos. 4,315,318and 4,317,179 and M. Ishida et al U.S. Pat. No. 4,346,409) havedisclosed particular relationships between the parameters and the valuesof D_(i) or D which can give further image enhancement. These techniquesdo not however distinguish between noise and image edges as far asenhancement is concerned, and the higher the density D_(i) or D thegreater the enhancement.

[0008] In other imaging technology areas, similar approaches have beenmade. Thus in E. Alparslau and F. Ince, IEEE Vol SMC-11, 376-384 (1981),images are treated with an edge enhancement algorithm based in part onan adaptive parameter based on the difference between the maximum andminimum pixel values in the window at any point. In U.S. Pat. No.4,237,481 final image data for printing plate production is treated byelectronic circuits according to algorithms that combine sharp andunsharp image data with pixel parameters. U.S. Pat. No. 4,334,244 treatsvideo signal images electronically according to algorithms based on thefixed average and wherein values acting on the instantaneous gradient ofthe image signal, the degree of edge enhancement being partly controlledby the dynamic noise of the system.

[0009] U.S. Pat. No. 4,571,635 describes a method of displaying orrecording an image showing enhanced detail (particularly edge detail)relative to an original image or record comprising:

[0010] (a) making a point by point record of the original image byscanning it in a manner to select successive pixels in a logical array,

[0011] (b) storing the pixel values in such a way and for such a periodthat a window comprising a sub-array of adjacent pixels can be selectedand analyzed statistically, said window comprising between 5 and 225pixels,

[0012] (c) analyzing the pixel values of the window surrounding eachpixel in turn to give the average value D and the standard deviationsigma,

[0013] (d) processing the central fixed value D_(c) to give an improvedvalue D′_(c) such that

D _(c) ′=kD _(c)+(1−k)D

[0014] wherein k is a variable having a value between 0 and 0.99 whichvaries from pixel to pixel based on the value of sigma, said value of kbeing related monotonically to sigma in such a way as to have an upperand lower bound within the said range 0 to 0.99, and

[0015] (e) displaying or recording the enhanced image based on thederived values D_(c)′. In effect, the process averages optical densityvalues, establishes a trend adjacent an edge, and then adjusts thedensity of individual pixels to continue the established trend.

[0016] Each of these references relates to image correction of edgedefects through the use of software embodying algorithms that assist inthe visual correction of the specifically identified region of defects,edges in the image. However, there arises a problem in reading anoriginal image such as a photograph or a painting having thick portionsand thin portions provided as a dot image by a half tone etching method.More specifically, because of the relation between the pitch betweeneach of the dots and the reading pitch by the image pickup device, or ofa subtle deviation of phase based on the period and the like in halftone processing, a periodical pattern of thick and thin portions calledmoiré pattern is generated, providing trouble in viewing.

[0017] Moiré patterns result from the interaction of the spatialfrequencies of at least two spatially extended periodic patterns whenthey are superimposed. The visual effect varies widely depending on therelative angular orientation, translation and frequency distribution intwo the patterns. In some cases moiré can lead to pleasing designeffects but in most situations in graphic arts moiré is to be avoided.Examples of undesirable moiré patterns are those formed in computermonitors or by overlap of color separations in color printing. One areain which moiré is a particular problem is in digital imaging, whereimages are formed as regular grids of picture elements or pixels. Suchgrids are associated with particular spatial frequencies that caninteract with other spatial frequencies of components present in devicesthat are part of the imaging chain. A commonly encountered situationinvolves the scanning of colored halftone printed media, such as thosecomposed of regularly spaced dots of colored ink of varying size.Typically, the scanner contains a detector such as a CCD (Charge CoupledDevice) array and the spacing of the array interacts with the spacing ofink dots to produce an undesirable moiré pattern in the scanned image.

[0018] The occurrence of such moiré patterns is well known in digitalimaging. One commonly found form of moiré is of high spatial frequencyin which the separation between elements of the moiré pattern iscomparable to the size of the smallest details in the image. It iscommon to remove this type of moiré pattern with some form of smoothingor blurring. In this procedure a compromise is made between eliminationof the moiré pattern and the loss of authentic fine detail in the image.There have been attempts to eliminate the moiré in the scanner itself byoptical blurring, as described in U.S. Pat. No 5,159,469, U.S. Pat. No.5,121,213, U.S. Pat. No. 4,987,496 European Patent 1,022,912 or JapanesePatent 8/149,358, or by adding noise or jitter to the scanning process,as described in U.S. Pat. No. 4,336,558 or Japanese Patent 51/45,757.Other attempts include matching the scanning frequency to spatialfrequency elements in the material to be scanned as disclosed in U.S.Pat. No. 5,253,046, U.S. Pat. No. 4,965,599 or European Patent 960,523or in Shu, J. S.-P., Springer, R. and Yeh, C. L., Optical Engineering,v.28(7), 805-12 (1989). There have also been efforts to combine multiplescans of the same subject in order to reduce moiré as is disclosed inU.S. Pat. No. 6,100,929, Ohyama, N., Yamaguchi, M., Tsujiuchi, J.,Honda, T. and Hiratsuka, S., Optics Communications, v.60(6), 364-8(1986) or Yang, C.-Y. and Tsai, W.-H., Pattern Recognition Letters,v.18(3), 213-27 (1997). Actions performed mechanically or electricallywithin the scanner can also be accomplished by digital computation.Thus, for example, U.S. Pat. No. 5,225,915 teaches the enhancement ofimage noise in order to mask moiré patterns. Scanners have been designedincluding computational means for blurring noise. For example, JapanesePat. Wei 10/276,331 discloses an averaging circuit, Japanese Pat. Wei11/275,367 the use of a moving average and U.S. Pat. No. 5,821,915 theuse of a weighted average filter, while Japanese Patent [2,000/023,085]teaches the use of a median filter for moiré suppression in a digitalcamera. Further, U.S. Pat. No. 5,239,390 teaches a descreening methodusing an iterative smoothing filter tuned to the frequency of thehalftone screen, while U.S. Pat. No. 5,166,810 discloses the removal ofhalftone mesh patterns by a combination of a smoothing filter and edgeemphasis, and U.S. Pat. No. 4,907,096 claims descreening by filtering inthe Fourier (or spatial frequency) domain. In addition to such low-passfiltering methods, there have been attempts to blur the image usingspecially shaped or directional filters. Thus, Japanese Pat. 1972/95,961describes a 2D filter with an axially symmetric impulse response,Japanese Wei Patent 10/003,539 discloses smoothing in the direction ofminimum brightness variation, U.S. Pat. No. 5,351,312 teaches a spatialfilter with positive coefficients in the main scan and cross-scandirections with negative coefficients in the diagonal directions, U.S.Pat. No. 5,649,031 claims a smoothing filter with maximum smoothing in adirection slanted with respect to the scan direction, and U.S. Pat. No.5,798,846 discusses the use of modified median filter with a speciallyshaped (e.g., cross-shaped) filter window.

[0019] Another variant of moiré defect occurs as widely spaced colorbands or blotches when colored halftone images are scanned. The spacingbetween these bands is very much larger than the scale of the finestauthentic details in the image. Thus, approaches for removing moiréusing blurring are completely unsuitable for removing this type ofdefect since blurring sufficient to reduce the bands will completelydestroy small, and often medium scale, detail in the image. This moirécolor banding is not unusual in scans produced by consumer scanners andthere is a need for a method to eliminate it. No generally applicableand straightforward methods exist for achieving this objective. Onemethod has been described by Kai Krause, originally in an electronicCompuserve Forum, and now available on the world wide web athttp://www.pixelfoundry.com/Tips/ under the title “Tip 10: LitterRemoval: Moire Removal”. This article teaches a method of removal offine moiré patterns using Gaussian blurring. Additionally, it disclosesan approach for reducing color bands. This latter method relies onsplitting the image into color channels such as red, green and blue andediting a look-up table that transforms each of these colors. Theprinciple involves manually examining each of the bands for the range ofcolor intensities present in a given channel and then manually editing alinear look-up table in such a way that this range of input intensitiesbecomes equal to a single average intensity after color transformationusing this table. This approach does not admit automation and requiresthat there must first be available a method of editing look-up tables,something not normally found in consumer software. In practice it isvery difficult to accomplish the disclosed correction in a way thatleaves the edges of bands looking natural and blended with the image. Ifthe color bands are not contained in a single color channel, multiplechannels must be edited in the way described. This is the situation inthe common case of skin tones, which can be accompanied by yellowbanding, and would therefore require at least the red and green channelsto be edited. Another disadvantage of this method of band elimination isthat, while the alteration may lead to reduction in banding, it alsoinfluences the same color channel in regions of the image where there isno banding. This introduces new defects. To cope with this problem, itis necessary to select separate regions of the image and correct theseregions individually. A further disadvantage of this approach is that itreduces the total number of colors in the image. In summary, the successof the published procedure depends very much on the specific imagecontent, requires great skill and familiarity with image processingconcepts, must be accomplished by time-consuming region-by-regioncorrection of the image, and cannot be automated. There remains,therefore, a need for a simple process for removing moiré-related colorbands that can operate rapidly on a complete image. The currentwidespread availability of inexpensive consumer scanners exacerbatesthis need.

[0020] The line screen that determines the ink dot spacing in halftoneprinting varies with the print medium. It can, for example, be about 80lines per inch for newspapers, about 133 or 150 lines per inch formagazines and books, and as high as about 200 lines per inch or more forhigh quality art reproduction, posing a wide variation in halftonespatial frequencies. At the same time scanners and their hardwarecomponents differ widely. In some examples of consumer scanners (asnoted in X. Liu and R. Erich, Image Vis. Comput., v.18(10), 843-8(2000)) non-uniform resampling of the image in the scanner introducesextra aliasing components and complicates the moiré pattern. It can beexpected that combinations of different printed media with differentscanner hardware will produce widely differing moiré patterns of thecolor band type. It is, therefore, surprising that the present inventioncan, in a simple way, reduce such moiré color bands in a broad varietyof images from such sources.

[0021] A method has been proposed to prevent the generation of the moirépattern, in which dimension or pattern of a dither matrix is changed inhalf tone processing. However, the moiré pattern cannot be eliminated bythis method when the reading pitch (the pitch between pixels in theimage pickup device) itself is the cause of the moiré pattern.

[0022] Under another method, the moiré pattern has been eliminated byarranging a filter for eliminating the moiré pattern in a light path inreading the original image and by gradation of the image by dispersingthe image focused on one pixel of the image pickup device onto adjacentpixels. However, the moiré pattern cannot be eliminated in all of theimages having thick portions and thin portions even by this method whena plurality of images with thick portions and thin portions havingdifferent dot pitches are included in the original image.

[0023] In image forming apparatus, such as copy machines, an image isread by an image-reading unit as a digital signal, and the digitalsignal is supplied to a recording unit so as to obtain a reproducedimage on a hard copy. In such an image-reading unit, an original is readout by an image sensor such as a CCD (Charge Coupled Device) imagesensor by dividing the image into small areas, that is, pixels. Ananalog electric signal obtained by the image sensor is converted into adigital signal, and then various image-processing operations are appliedto the digital signal so as to obtain optimum image data in accordancewith the image characteristics thereof. In this type of image formingapparatus, an original is read out by a line sensor or the like having asmall pixel size. Accordingly, when intensity change of the originalimage has periodicity such as in a half tone image, there is apossibility of formation of moiré in a recorded image due tointerference of the periodicity of the intensity change of the originalimage with the pitch of the image sensor arranged in the line sensor,that is, the sampling period. This moiré can be eliminated bysuppressing the periodicity of the intensity change through a pluralityof pixels by averaging the intensity of the pixels. However, whenintensities of a plurality of pixels are averaged to eliminate a moiré,the resultant character image or continuous-tone image may beundesirably blurred. Therefore, there is a problem in that when a meshimage and a character image or a continuous-tone image are mixed in oneoriginal image, the averaging process must be applied only to the meshimage area.

[0024] The reproduction of intermediate tone in such digital copyingmachines is generally achieved by a dither method or a density patternmethod. However, such methods have been associated with the followingdrawbacks: (1) if the original image is a screen-tone image such as aprinted image, the copied image may show stripe patterns which do notexist in the original image; and (2) if the original image containsline-tone images or characters, the image quality may be deteriorated asthe edges are broken by the dither method. The phenomenon (1) is calledMoiré moiré and is induced by:

[0025] (a) a frequency phenomenon between the screen-tone original imageand the input sampling; or

[0026] (b) a frequency phenomenon between the screen-tone original imageand the dither threshold matrix.

[0027] The phenomenon (b) becomes particularly evident when the ditherthreshold values are arranged in a dot concentrated pattern. In suchcase the reproduced image has a pseudo-screentone structure, whichgenerates a frequency phenomenon with the screentone structure of theinput image, thus creating moiré patterns.

[0028] U.S. Pat. No. 4,926,267 describes a method for use in reducingmoiré patterns during reproducing a halftone original having extentalong first and second directions, the original being formed fromhalftone dots situated along a screen direction and having a spatialfrequency f_(SCR) and period P_(SCR) in the screen direction comprising:

[0029] providing gray level values for an array of pixels extending overthe original, the pixels having a first spatial frequency f_(SCR1) insaid first direction and a corresponding first period P_(SCR1) in saidfirst direction;

[0030] developing a first gray level value for each pixel of the arraywhose gray level value equals or exceeds a threshold gray level valueand developing a second gray level value for each pixel of the arraywhose gray level value is less than the threshold gray level value, saidfirst and second gray level values defining a set of thresholded graylevel values for said pixels;

[0031] determining from said set of thresholded gray level valuesadjacent pairs of pixels of the array in the first direction whosethresholded gray level values are different, each adjacent pair ofpixels bordering a corresponding halftone dot;

[0032] determining from the gray level values of the pixels an edgeerror e₁equal to d₁/P_(SCR1) where d₁ is the approximate distance alongthe first direction between the center of the pixel the pair whosethresholded value is equal to said first gray level value and theclosest edge of the corresponding halftone dot;

[0033] and processing said thresholded gray level values of said pixelsof said array including: (a) using a processing window to definesuccessive sub-arrays of said pixels and for each sub-array of pixels:(i) adding the edge errors e₁ for the determined adjacent pairs ofpixels included in the sub-array to form a sum S₁; and (ii) for thepixels having thresholded second gray level values and being in thedetermined adjacent pairs of pixels, starting with the pixel of theadjacent pair of pixels having the highest edge error and continuingwith further pixels of the adjacent pairs of pixels in the order ofdescending edge error, changing the thresholded gray level values of thepixels from said second to said first threshold gray level value untilthe thresholded gray level values of M pixels have been changed, where Mis the closest integer to the sum S₁.

[0034] U.S. Pat. No. 5,408,337 describes an image processing apparatusin which a moiré pattern occurring in a half tone area can be eliminatedby a suitable filter. A plurality of data blocks comprising N*N pixeldata are transformed by means of a two-dimensional orthogonal transformso as to obtain an N*N matrix transformation factor block. An evaluationblock is prepared which comprises N*N transformation factors each ofwhich is the mean value of the absolute values of corresponding factorsfrom a data block being considered and data blocks surrounding the datablock to be determined. Mean values A[i] and B[i] (i=0 to L−1) ofpredetermined transformation factors are calculated, A[i] being meanvalues of factors included in a number L of first areas consecutivelypositioned along a diagonal line of the evaluation block, B[i] beingmean values of factors included in a number L of second areas positionedadjacent to and lower in frequency to the corresponding first areas. Afilter selection signal is generated which corresponds to the number iwhen a condition is satisfied where A[i]>B[i] and A[i]>threshold valueth1. The pixel data corresponding to the evaluation block is smoothed bythe selected filter.

[0035] As noted above, moiré patterns can also be generated in monitorsor other cathode ray tubes. Color cathode ray tubes (“CRTs”) arecommonly used as visual display devices, employing up to threeelectrodes, typically one for each primary color: red, green, and blue.Most color CRTs use a shadow mask to selectively illuminate a matrix ofeach electrode's respective colored phosphors (i.e., red, green, andblue). CRTs normally will have a shadow mask placed behind aphosphor-coated screen. The shadow mask is usually a metal foil withnumerous perforations which allow the electron beam sourced by aparticular electrode to selectively strike its respective phosphor dot.The electron-beam is focused by magnetic lenses in the CRT neck into asmall spot before the electron-beam reaches the shadow mask. Theelectron beam from the green cathode is partially occluded by the shadowmask such that the electron beam only strikes the corresponding greenphosphor after passing through the shadow mask. The beam is typicallylarger than the shadow mask perforation size, so the shadow mask blockspart of the beam and casts a smaller shadow of the original beam ontothe desired phosphor.

[0036] The dot pitch, or spacing, between adjacent shadow maskperforations, and their corresponding phosphor dots, must be as small aspossible for the highest resolution. For mechanical and economicreasons, the dot pitch is generally limited to about 0.2 millimeters(“mm”) to 0.3 mm for a typical high resolution display CRT. As theelectron beam traverses the screen, the shadow mask includes a periodicillumination pattern depending on whether the beam either impinges upona perforation, and consequently the phosphor, or strikes the metal foilof the shadow mask separating the perforations. Because the sweep rateof the electron beam is known, an equivalent frequency for the resultingsinusoid can be calculated, and is referred to as the spatial frequencyof the shadow mask, ν_(spatial).

[0037] To increase the resolution of the display, the spot size of theincident electron beam must be made as small as possible. As theelectron beam spot size is reduced and begins to approach the dimensionsof the phosphor dot pitch, the amount of a particular phosphor that isactually struck by the beam is a function of how well the electron beamspot is aligned to the shadow mask aperture corresponding to theintended phosphor. Moreover, it must be noted that the electron beamspot shape is not constant as the beam traverses the CRT screen. Inparticular, the beam spot varies from a circular shape at small anglesof deflection, e.g., near the center of the CRT screen, becoming moreeccentric or ovaloid at higher angles of beam deflection, e.g., near thescreen perimeter. If a video pattern of alternating on-off phosphors(“pixels”) is displayed, some of the pixels will be seen to be exactlyaligned with the shadow mask and therefore will have uniform phosphorbrightness across the dot, whereas other phosphors will exhibit anonuniform brightness, a consequence of misalignment between electronbeam and shadow mask aperture. The repeating pattern of varyingly brightpixels also is seen to be of sinusoidal form, with a frequency ν_(spot)equivalent to half the pixel clock frequency, where one pixel clockcycle turns on the spot, and the next pixel clock cycle turns off thepixel. As the spot size of the electron beam is reduced while viewingthe on-off pattern, a periodic visual interference pattern known asmoiré is produced in each video line scanned across the CRT. Thefrequency ν_(Moiré)of the moiré interference pattern is the differencebetween the spatial frequency of the shadow mask ν_(spatial), and thefrequency of the electron beam spot ν_(spot), or

ν_(Moire)=ν_(spatial)−ν_(spot).

[0038] If the two frequencies ν_(spatial) and ν_(spot) were identicaland in-phase, the moiré frequency ν_(Moire) would zero out. A moiréfrequency of zero is the ideal case, where each phosphor has acorresponding shadow mask aperture through which the correspondingelectron beam travels. From a particular standpoint, however, the spotsize varies as a function of the electron beam deflection angle andfocus voltage. Therefore, there may be a significant variation ofelectron beam spot size depending on the age of the CRT and position ofthe electron beam on the screen. Hence, the ideal case typically cannotpracticably be realized. In fact, the closer the spatial frequency andthe spot frequencies are to each other, the lower the moiré beatfrequency ν_(Moire) and the more visible and objectionable the moiréinterference pattern becomes. In addition, because the electron beamspot size varies across the face of the CRT, the individually scannedvideo lines will each produce a slightly different moiré interference,and therefore the moiré pattern itself varies as a function of electronbeam position.

[0039] From an operating standpoint, the moiré interference phenomenonposes a serious aesthetic problem, since the best electron beam focusand highest image resolution results in unacceptably noticeable moirépatterns if the video signal being displayed includes alternating pixelpatterns, which is a common occurrence. From the prior art teachings,the moiré interference problem has been addressed in three ways. First,the shadow mask and phosphor dot pitch can be reduced, which raises theeffective spatial frequency of the CRT, thereby raising the moiré beatfrequency so that it is less visible. The result is that in order toreduce the moiré effect, much lower resolution images must be displayedon a CRT that is inherently capable of significantly higher resolution.Second, the electron beam can be defocused so that the spot size of theelectron beam is increased, thereby decreasing the amplitude of thephosphor illumination, which in turn reduces the amplitude of thephosphor spot frequency. The lower amplitude spot sinusoid results in adecrease of the amplitude, and therefore visibility, of the resultingmoiré interference. Again, significant reduction in resolution and imagequality are exchanged for only moderate reduction in moiré interference.A third option is to avoid displaying video signals with alternatingpixel or phosphor illumination patterns, and to simply tolerate theresultant moiré interference patterns when they occur.

[0040] U.S. Pat. No. 5,107,188 describes how visible moiré interferenceis eliminated by alternately shifting the phase of the horizontal syncsignal or video signals such that the phase of each video line, andhence the phase of the resulting moiré interference associated with thatvideo line, is also alternately shifted. The phase of the moiréinterferences are shifted such that persistence of vision in the humaneye averages oppositely phased phosphor intensity variations occurringon alternating scan lines and/or vertical fields. When viewed by a userof the CRT, optical cancellation of the moiré interference patternsresults.

[0041] U.S. Pat. No. 6,094,018 describes another method of addressingmoiré patterns in a display monitor. A horizontal synchronization signalhaving a horizontal scanning frequency is received by a first circuit. Avertical synchronization signal having a vertical scanning frequency isreceived by a second circuit. A moiré correction signal that isproportional to a horizontal resolution of the displayed image isgenerated by dividing the horizontal scanning frequency by the verticalscanning frequency.

[0042] As can be seen, the main emphasis on the reduction of moirépatterns, both in printed and monitor images has been directed towardsbreaking up the relative frequencies between overlying or contiguouspatterns. It is desirable to find alternative methods of reducing moiréin images, particularly within software solutions.

SUMMARY OF THE INVENTION

[0043] A matrix of pixels within an electronic image in which moirépatterns are present is treated to modify pixel densities to reducevisible moiré patterns without damaging the quality of the imagecontent. A grid or matrix of pixels for the entire image or a section ofthe image is created. Sub-matrices, comprising a minimum of 7×7 pixelsare used to compare optical density values of systematically locatedpixels that are not adjacent to a relatively central pixel within thematrix (e.g., there is at least one pixel between the central pixel andthe non-adjacent pixel). For example, in a 7×7 matrix of pixels, thecentral pixel would preferably be compared to the four corner pixels,and the four outside row centered pixels. The optical density value ofthe matrix-centered pixel (or other specific optical value such as CIEL*a*b*, CIE L*u*v*, tristimulus values, color content, etc.) would becompared to the eight preferred pixels specified above. A number of thepixels, preferably less than all of the compared pixels, would beselected on the basis of their compared values being the closest withinthe group to the measured optical value of the sub-matrix-centeredpixel. The average or mean value of the selected pixels would then beused as the optical value for the sub-matrix-centered pixel. That valuewould then be stored in a program for later use in generating a finalimage. The process would then be performed again by selecting anotherpixel as the sub-matrix-centered pixel. When a sufficient number (or allof the pixels) within the area to be cleansed of moiré pattern have beentreated by the process and the complete image data saved in the program,the image data may then be presented in a visual form with reduced moirépattern thereon.

BRIEF DESCRIPTION OF THE FIGURES

[0044]FIG. 1 shows a sub-matrix array of pixels with a 7×7 matrix with amatrix-center pixel and edge-centered pixels identified.

[0045]FIG. 2 shoes a 13×13 sub-matrix array of pixels with amatrix-center pixel and edge-centered pixels identified.

[0046]FIG. 3 shows a collection of sub-matrices of pixels that are usedfor moiré correction within a general matrix of pixels.

[0047]FIG. 4 shows a sub-matrix where the pixels to be averaged areselected in a rotated asymmetry around the central pixel in aparallelogram.

DETAILED DESCRIPTION OF THE INVENTION

[0048] It is at least a desirable objective in the provision of imagesto provide images without flaws. In professional image-provision fields,such as advertising, web-page design, printing, sign-making, andphotography, a first measure of the quality of the work is theappearance of the pictures/images provided. Certain types of flaws tendto be more obvious to visual observance than others, and the presence ofmoiré patterns is one of the most obvious observable technical flaws.The reason that moiré patterns tend to be so readily observable is thepseudo-pattern, or density frequency of the defect. Rather thanoccurring only at random independent dots (half-tone imaging), points(e.g., monitor display) or pixels (raster imaging or monitor display),moiré patterns occur over areas of the image, occur over multiple areas,and tend to cover relatively large areas of an image so that the patternis readily observed on first viewing the image.

[0049] The correction of moiré defects has been addressed byimage-makers at least since the time that half-tone imaging was firstintroduced and the problem occurred. The advent of digital imaging,inherently digital CRT screens, the increased use of computer imaging,and other technical advances have increased the occurrence of moirépatterns in regular business and private practice. The inherentlimitation in the ability to control the image medium where a fixedspatially distributed medium is used (such as a CRT or monitor screen)requires new methodologies for correcting or at least redressing orminimizing moiré effects. It has been determined by the inventors thatthe use of only adjacent pixel-by-pixel analysis is insufficient tosatisfactorily address the moiré effect. Although the moiré effect canbe softened, adjacent pixel-by-pixel analysis still may leave asignificantly visible pattern

[0050] It has been found that the use of a system of pixel adjustmentsin which at least some distal pixel weighting in the adjustment ofindividual and collective pixels within the image provides a much moreeven and smooth reduction in the appearance of moiré patterns in theimage.

[0051] To appreciate the practice of the invention, some understandingof the structure of images is desirable. All images, at some level, areconstructed of sub-elements of the image. Even with what is consideredan analog image (e.g., a painting created with a brush spreading paintacross a surface), microscopic or sub-microscopic analysis would showpigments distributed over the surface of the substrate or canvas. Still,digital imaging is recognized as distinct from analog imaging and isdefined by the existence of a collection of distinct areas ofapproximately equal size (e.g., half-tone imaging usually comprises dotsvarying in size from about 3% dots to 98% dots) that are organized in arelatively matrix pattern of columns and rows. These sub-elements orsmallest image components are known in the art as pixels. The pixelsthemselves, especially when produced by laser imaging or otherhigh-resolution exposure systems, may itself be formed by smaller units(e.g., in laser imaging, a pixel may be composed of a large number ofspots, each spot being approximately the incident area of the laser, andin CRT displays, a pixel could comprise an area comprising amultiplicity of phosphor particles comprising either a single color or amultiplicity of colors). However, within each imaging field, the pixelis usually accepted as a specific unit of the image. For example, inlaser imaging, the software program defines how many spots (includingzero energy spots to reduce the image density of a pixel) willconstitute a pixel and how those spots will be distributed over thepixel area. Therefore the unit of the pixel is a common working toolwell understood by the imaging artisan.

[0052] In providing a computer-based image, the image is stored as adigital image, which inherently defines a system or matrix of pixels.The data is stored in a digital format, which inherently considers theimage surface as a distribution of columns and rows of pixels or imagecomponents. Therefore digital or computer-based imaging is inherentlysubject to moiré effects and is also susceptible to a uniform mechanismof correction that cannot as readily depend upon adjustment of thepattern of lay-down of the image and must look in another direction ofadjustment in the image content to overcome a moiré defect.

[0053] The present invention provides a unique basis of pixel-by-pixeladjustment to correct moiré defects in digital imaging, especiallyimages generated from computer-stored digital data. The processcomprises providing a digital image comprising a matrix of pixels;dividing the matrix into smaller sub-matrices of pixels; selecting anapproximately statistically or physically central pixel or group ofpixels within the sub-matrix for adjustment for correction of moiréeffects; selecting at least some pixels that are distal from the centralpixel or central group of pixels (distal means non-adjacent, e.g., atleast one pixel is present between the central pixel or any group ofcentral pixels and any selected distal pixel or distal group of pixels)and are generally distributed around the central pixel or central groupof pixels (e.g., symmetry, near symmetry or surrounding distribution isdesired); at least four distal pixels (or pixel groups), preferably atleast six distal pixels (or pixel groups), and preferably at least 8distal pixels (or pixel groups) are selected; an image property (e.g.,optical density, specific color optical density, optical reflectance,hue, tone, etc, preferably some quality of optical density) is comparedbetween all or most of the selected distal pixels and the central pixelor central group of pixels; preselecting a number of distal pixels thatwill be used in creating an adjusting value for the central pixel orcentral group of pixels (the preselected number may be the number of allof the distal pixels, but is preferably a number less than all of thedistal pixels, e.g., between 40% and 75% of all distal pixels);determining which preselected number of distal pixels are the distalpixels with the closest values/properties to the central pixel orcentral group of pixels to define a relative group of values/properties;averaging the values/properties of the relative group; assigning theaverage value to the central pixel or central group of pixels; storingthe assigned value for that central pixel or central group of pixels;and repeating the analysis and value storage for a different sub-matrixof pixels or for a different pixel or pixel group considered as thecentral pixel or central group of pixels within the original sub-matrix.This process would be repeated for the same property or for otherproperties (e.g., the optical density for each color in the image, e.g.,cyan, magenta, yellow and black) until a user satisfactory treatment ofthe image has been performed, including treatment of most or all pixelswithin the image or repeated treatment of all or most pixels within theimage.

[0054] The present invention relates to a method of removing defectsfrom a scanned image or digitized image. In particular it refers to avirtual filter for removing moiré color bands. The virtual filter(hereinafter merely referred to as a filter or filter window) is in theform of a window that is successively centered over each pixel in theimage and the values of various pixels within the window are used tocompute a new, corrected value for the central pixel of the window. Thisnew value can conveniently be written to a new output image array inorder to leave unaffected the original pixel values of the image, soretaining them for calculations at different positions of the window inthe input image. More specifically, the invention concerns a filterwindow whose size is determined by specific mathematical relationships.Additionally, only certain specific groups of pixels within this filterwindow are used in the calculation of the corrected pixel value.

[0055] The filter window of the invention is a square whose sides arepreferably positioned parallel to the horizontal and vertical edges ofthe image (although skewed, rotated, parallelogram orientations may beused). An example of a non-square, non-rectangular orientation ofaveraging pixels in the shape of a parallelogram is shown in FIG. 4where the eight averaging pixels in a an eight pixel selection from a7×7 matrix have been rotated from a square symmetrical orientation toform the parallelogram. It is also envisaged that the horizontal axis ofthe filter window may be oriented at an angle to the horizontal axis ofthe image, for instance at angles commonly used as screen angles inprinting (e.g. 0, 15, 45, 75, 108, 162 degrees). It is further envisagedthat different orientations may be used for processing different colorchannels, or the same orientation may be used for all colors. The widthand height of the window is an odd number of pixels such that the windowcan be approximately or exactly positioned symmetrically and centered onthe pixel being corrected. The width and height of the window in pixelsis preferably given by the formula 6k+1, where k is an integer greaterthan zero. Thus, the defined window sizes increase in the series 7, 13,19, 25, 31, 37, 43, 49, 55 . . . . Within this series of filter windows,along with the center pixel, only the pixels at the comers of the squareand the centers of the sides are used to compute corrected pixel values.Thus, for a central pixel p(i,j) having image row and column coordinatesi and j respectively, the corner pixels are defined as:

p(i−3k,j−3k), p(i−3k,j+3k), p(i+3k,j−3k), p(i+3k,j+3k)

[0056] and the pixels at the centers of the edges of the window aredefined as:

p(i,j−3k), p(i,j+3k), p(i−3k,j), p(i+3k,j).

[0057] The filter window is successively positioned in the image atlocations corresponding to i from 1 to h inclusive and, independently, jfrom 1 to w inclusive, where h is the height of the image in pixels andw is the width of the image in pixels. However, it is not required touse positions corresponding to all combinations of i and j. For example,combined values of i and j can be chosen such that the filter is appliedonly in regions of the image where color banding is especially visible.

[0058] In a color image, at least three components are required todescribe the color, for example a) red, green and blue or b) hue angle,saturation and lightness, though it is possible to use more colors, suchas cyan, magenta, yellow and black with subtractive color components. Ingeneral, pixel colors can be represented in one of many color spaces,which can be transformed one space to the other. However, it is typicalto transform the final image color representation to red, green and bluefor display on a monitor or to cyan, magenta, yellow and black forprinting. For the practice of this invention, it is advantageous toconvert the image to a color space that is an opponent color space priorto applying the window filter. Such a color space has two color axesthat approximately correspond to human color vision. Thus, one axisrepresents approximately colors ranging from yellow to blue and a secondaxis colors ranging from red to green. The remaining third axis is ameasure of the brightness of the color. Such color axes are termedopponent since humans cannot see colors such as yellowish-blue,bluish-yellow, reddish-green or greenish-red. It will be understood bythose skilled in the art that there are many color spaces with anapproximately opponent property. For the practice of this invention itis sufficient that the color space has only an approximately opponentcharacter and not an exact match to the characteristics of human vision.Examples of such color spaces include YUV, YIQ, YCC, YC_(b)C_(r) andYES. It is also possible to define suitable color spaces by simplearithmetic manipulation of the red (R), green (G) and blue (B) colorchannels. Thus, a first color axis can be defined as R−G, a second coloraxis as 0.5(R+G)−B, and a third as 0.33(R+G+B). However, it is desiredthat the axes of the color space should correspond to similar perceptualcolor distances. Particularly preferred for the practice of theinvention are opponent color spaces with good perceptual uniformity suchas CIE L*u*v* or CIE L*a*b*. Most especially preferred is CIE L*a*b*.

[0059] During the operation of the filter, the four pixels at thecorners and the four pixels at the centers of the sides of the windoware ranked by similarity of color relative to the color of the centralpixel p(i,j). Various measures of color difference can be used in acolor space with three orthogonal dimensions, such as the Manhattan orcity block distance and the Mahalanobis distance. However, it ispreferred to use a simple Euclidean or Pythagorean distance computed asthe square root of the sum of the squares of the color differences alongeach of the three axes. In the case of the CIE L*a*b* color space, thisEuclidean distance corresponds to the measure known as ΔE, and isparticularly preferred. Other variants of ΔE, such as ΔE_(CMC) or ×E94,are known to represent color differences more according to humanperception than does ΔE and can also be used as measures of colordifference. However, it has been found that the extra computationaleffort required to calculate such more perceptually accurate distancesdoes not normally justify itself in improved performance of the filter.

[0060] Once the eight pixels have been ranked in order of increasingcolor difference from the central pixel p(i,j), the colors of a certainnumber of the pixels with the most similar color to that at p(i,j) areaveraged. While it is possible to average from two to seven of the mostsimilar colors, it is preferred to average from three to five of themost similar colors. It is especially preferred to average the fourcolors that are most similar to the color at p(i,j). This average colorbecomes the replacement or corrected color at the central pixel p(i,j).While it is possible to compute a weighted average of the selectedpixels, it has been found preferable to compute a simple average. Inthis way, colors can be transferred from one region of the image toanother, over large distances, without destroying image detail. Thespecific differences selected may be based on preselected criteria. Forexample, if a pixel difference exceeds a specific amount (e.g., thecentral pixel has a gray scale value of 200, seven of the pixels havegray scale values between 100 and 220, and one pixel has a gray scalevalue of 10, the software selection criteria may effectively assume thatan edge or boundary condition is present and exclude any pixel with suchan egregious difference as compared to the other relative differences.With eight pixels or pixel groups selected, the middle six values, thesix highest values, the five lowest values, or any other preselectedcombination may be chosen as the basis for choosing the four, five, sixor seven averaging pixels.

[0061] Because colors are transferred over large distances the perceivedsaturation or vividness of the image color can change somewhat,especially when very large filter window sizes are used. For this reasonit is preferred to use the smallest window that will remove the colorbanding. The most usual setting is k 3. In an opponent color space,saturation is approximately represented by the distance of a color fromthe lightness axis measured perpendicular to this axis. In the CIEL*a*b* color space this distance is referred to as chroma. For thepurpose of further discussion the word chroma will be used to describethis distance in any opponent color space. Saturation may also berepresented as chroma divided by lightness. It is possible to restoreany decreased saturation in a variety of ways, for instance byconstructing look-up tables based on the initial chroma histogram andthat after processing with the disclosed filter. However, it has beenfound adequate to restore the saturation in a simpler way as follows.After operation of the disclosed filter, for every pixel in the imagethe chroma, C, is calculated and the maximum chroma in the image,C_(max), is estimated. Then corrected chroma values, C_(corr), arecalculated according to: C_(corr)=C_(max)·(C/C_(max))^(1/x). Thequantity x can range from about 1.01 to about 1.60, but the preferredvalue is around 1.2.

[0062] Reference to the Figures will assist in a further understandingand appreciation of the present invention. FIG. 1 shows a very simplesub-matrix for use in adjusting individual pixel density according tothe present invention. FIG. 1 shows a 7×7 sub-matrix. A central pixel Cis shown within the 7×7 sub-matrix. Eight surrounding distal pixels X(which are shown as symmetrically disposed, but they may be somewhatweighted, as discussed later, or not completely symmetrical, asdiscussed later) are shown. A simple performance of the process of theinvention would be to measure the optical density of C and the opticaldensity of each X. The optical densities of each X would be compared tothe optical density of C. Either all of the optical densities of the Xpixels would be averaged to produce a relative property value, or lessthan the number of all of the distal pixels X would be used and averagedto define a relative property value. The number may be preselected in anumber of different ways, such as choosing from N distal pixels, N−1pixels, N−2 pixels, N−3 pixels, N−4 pixels, N/2 pixels, N/2+1 pixels,N/2−1 pixels, or the like. The basis of selecting the specific pixelsused in effecting the relative property value could be the selection ofthose pixels having the closest property value to that of the centralpixel, the farthest value from the value of the central pixel, orweighted values tending towards a lower value (e.g., in selecting sixdistal pixels, selecting the closest four lower values and the twoclosest higher values) or towards higher values (e.g., in selecting fourdistal pixels, selecting the closest higher three value pixels and theclosest lower one value pixel). The selected pixels would then be numberaveraged or weight averaged for the property to define a relative valuefor the central pixel C. That value would then be assigned to the storeddata for the sub-matrix and for the image of which the sub-matrix andthe pixel is a component. The procedure would be repeated for as manypixels as desired, as many matrices as desired, a percentage of pixelsor all of the pixels within the image or a defined image area (e.g., asection where moiré appears).

[0063]FIG. 2 is very similar to FIG. 1, showing a 13×13 matrix with thecenter pixel C identified and eight distal pixels X identified. Again,the distribution of distal pixels X is shown as symmetric, but that isnot essential although it is desirable. For example, all or some of thedistal pixels could be shifted (0,1), (1,0), (1,1), (1,−1), (0,2) or(2,0) units or the like along Cartesian coordinates.

[0064]FIG. 3 shows a matrix that includes a number of sub-matrices. Thedistal pixels X relate to central pixel C. The distal pixels B₄ relateto central pixel C₄. The distal pixels B₃ relate to central pixel C₃.The distal pixels B₂ relate to central pixel C₂. The distal pixels B₁relate to central pixel C₁. As mentioned earlier, rather than selectingonly single central pixels (e.g., C), central groups of pixels could beused in the moiré reduction process of the invention. As shown in FIG.3, this could be done by selecting all of pixels C, C₁, C₂, C₃, and C₄(and or other closely positioned or adjacent pixels) as a central pixelgroup, and assigning a relative value determined by averaging valuesfrom distal pixels that may comprise all distal pixels shown (e.g., X,X₁, X₂, X₃, and X₄), or less than all distal pixels (e.g., only one ofX, X₁, X₂, X₃, and X₄, more than one but less than all of (e.g., X, X₁,X₂, X₃, and X₄), or other combinations of these or other distal pixels.It is also possible to have some adjacent pixels considered in theaveraging, as where in treating C₁, one or more of C and C₃ could beused as an averaging pixel. It is preferred that at least half, at least⅔, at least ¾, at least ⅞ or all averaging pixels are distal pixels asdefined in the present invention.

What is claimed:
 1. A method of reducing image defects in a digitalimage comprising: providing a digital image data set in the form of amatrix of pixels; selecting a sub-matrix comprising at least a 5×5matrix of pixels; identifying a pixel within the sub-matrix to betreated as a central pixel; determining a value for at least one opticalproperty in the central pixel; selecting at least four pixels around thecentral pixel as averaging pixels, at least two of the averaging pixelsbeing in a position in the sub-matrix that is not adjacent the positionin the matrix of the central pixel; determining a value for the at leastone optical property for the at least four averaging pixels; averagingthe values for the at least one optical property for more than one ofthe at least four averaging pixels to provide an average treatment valuefor the central pixel; assigning the average treatment value for thecentral pixel to the central pixel; and storing the average treatmentvalue assigned to the central pixel.
 2. The method of claim 1 whereinthe matrix is an at least 7×7 matrix of pixels.
 3. The method of claim 2wherein at least six averaging pixels are selected.
 4. The method ofclaim 2 wherein at least eight averaging pixels are selected.
 5. Themethod of claim 3 wherein more than one but less than all averagingpixels are used to determine the average treatment value.
 6. The methodof claim 4 wherein more than one but less than all averaging pixels areused to determine the average treatment value.
 7. The method of claim 2wherein at least three averaging pixels are pixels that are not in aposition adjacent in the matrix to the central pixel.
 8. The method ofclaim 3 wherein at least four averaging pixels are pixels that are notin a position adjacent in the matrix to the central pixel.
 9. The methodof claim 2 wherein all averaging pixels are pixels that are not in aposition adjacent in the matrix to the central pixel.
 10. The method ofclaim 3 wherein all averaging pixels are pixels that are not in aposition adjacent in the matrix to the central pixel.
 11. The method ofclaim 7 wherein average treatment values are defined, assigned andstored for at least 20% of the pixels in the digital image.
 12. Themethod of claim 8 wherein average treatment values are defined, assignedand stored for at least 20% of the pixels in the digital image.
 13. Themethod of claim 10 wherein average treatment values are defined,assigned and stored for at least 20% of the pixels in the digital image.14. The method of claim 7 wherein average treatment values are defined,assigned and stored for at least 80% of the pixels in the digital image.15. The method of claim 10 wherein average treatment values are defined,assigned and stored for at least 80% of the pixels in the digital image.16. The method of claim 1 wherein the central pixel comprises a group ofpixels that is less than all pixels in the sub-matrix.
 17. The method ofclaim 7 wherein the central pixel comprises a group of pixels that isless than all pixels in the sub-matrix.
 18. The method of claim 10wherein the central pixel comprises a group of pixels that is less thanall pixels in the sub-matrix.
 19. The method of claim 1 wherein for atleast some pixels in the image, the saturation of the at least somepixels is further modified following assigning the average treatmentvalue for the central pixel to the central pixel.
 20. The method ofclaim 1 wherein for at least some pixels in the image, the chroma, C, iscalculated and the maximum chroma in the image, C_(max), is estimated,using C_(max) to determine corrected chroma values C_(corr) according tothe formula: C _(corr) =C _(max)·(C/C _(max))^(1/x)., wherein x is fromabout 1.01 to about 1.60, and these corrected chroma values are storedas at least part of stored image data.
 21. The method of claim 20wherein all C_(corr) for all pixels in the image are determined andstored.
 22. The method of claim 1 wherein selecting a sub-matrixcomprising at least a 5×5 matrix of pixels comprises selecting a squarefilter of width 6k+1 pixels, where k is an integer greater than zero,positioned approximately centrally on an image pixel.
 23. The method ofclaim 22 wherein 6k+1 is 7, and wherein from 2 to 7 pixels are selectedfrom the group of 8 pixels constituting comers and centers of the sidesof the square, and the 2 to 7 pixels are used to compute a new correctedcolor value for the image pixel.
 24. The method of claim 22 wherein 6k+1is selected from the group consisting of 7, 13, 19, and 25 and whereinfrom 2 to 13 pixels are selected from the group of total pixels in thesquare and the 2 to 13 pixels comprise at least some comers and centersof the sides of the square, and the 2 to 7 pixels are used to compute anew corrected color value for the image pixel.
 25. The method of claim24 wherein corrected values are determined by averaging values from the2 to 7 pixels.
 26. The method of claim 25 wherein from 4 to 13 pixelsare averaged to determine the corrected values.
 27. The method of claim2 wherein at least 8 pixels are averaged to determine corrected values.28. A computer with imaging system associated therewith, the computercontaining software therein that directs a process for improving imagedefects comprising: providing a digital image data set in the form of amatrix of pixels; selecting a sub-matrix comprising at least a 5×5matrix of pixels; identifying a pixel within the sub-matrix to betreated as a central pixel; determining a value for at least one opticalproperty in the central pixel; selecting at least four pixels around thecentral pixel as averaging pixels, at least two of the averaging pixelsbeing in a position in the sub-matrix that is not adjacent the positionin the matrix of the central pixel; determining a value for the at leastone optical property for the at least four averaging pixels; averagingthe values for the at least one optical property for more than one ofthe at least four averaging pixels to provide an average treatment valuefor the central pixel; assigning the average treatment value for thecentral pixel to the central pixel; storing the average treatment valueassigned to the central pixel; and displaying the image with the storedaverage treatment value displayed in the image.
 29. The computer withimaging system of claim 28 wherein the matrix is an at least 7×7 matrixof pixels and at least eight averaging pixels are selected.
 30. Thecomputer with imaging system of claim 28 wherein the matrix is an atleast 7×7 matrix of pixels and average treatment values are defined,assigned and stored for at least 80% of the pixels in the digital image.31. The computer with imaging system of claim 30 wherein the centralpixel comprises a group of pixels that is less than all pixels in thesub-matrix.
 32. The computer with imaging system of claim 30 whereinaverage treatment values are defined, assigned and stored for at least80% of the pixels in the digital image and the central pixel comprises agroup of pixels that is less than all pixels in the sub-matrix.
 33. Thecomputer with imaging system of claim 29 wherein the matrix is an atleast 7×7 matrix of pixels, average treatment values are defined,assigned and stored for approximately 100% of pixels in the digitalimage and eight averaging pixels are selected for each pixel for whichaverage treatment values are assigned.
 34. A method of reducing moirédefects in a digital image comprising: providing a digital image dataset in the form of a matrix of pixels; selecting a sub-matrix comprisingat least a 5×5 matrix of pixels; identifying a pixel within thesub-matrix to be treated as a central pixel; determining a value for atleast one optical property in the central pixel; selecting at least fourpixels around the central pixel as averaging pixels, at least two of theaveraging pixels being in a position in the sub-matrix that is notadjacent the position in the matrix of the central pixel; determining avalue for the at least one optical property for the at least fouraveraging pixels; averaging the values for the at least one opticalproperty for more than one of the at least four averaging pixels toprovide an average treatment value for the central pixel; assigning theaverage treatment value for the central pixel to the central pixel; andstoring the average treatment value assigned to the central pixel.